//
//  LLDispatch.m
//  LLFoundation
//
//  Created by wangzhaomeng on 16/10/8.
//  Copyright © 2016年 MaoChao Network Co. Ltd. All rights reserved.
//

#import "LLDispatch.h"

@implementation LLDispatch

#pragma mark - 延时调用
void LLDispatch_after(float delay,doBlock block){
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delay*NSEC_PER_SEC)),
                   dispatch_get_main_queue(),
                   block);
}

#pragma mark - 异步调用
void LLDispatch_async(doBlock block){
    dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
    dispatch_async(queue, block);
}

#pragma mark - 返回主线程
void LLDispatch_main(doBlock block){
    dispatch_async(dispatch_get_main_queue(), block);
}

@end
